<!--
 * @Author: your name
 * @Date: 2021-01-13 10:16:16
 * @LastEditTime: 2021-02-09 16:09:42
 * @LastEditors: jiaohai
 * @Description: In User Settings Edit
 * @FilePath: \sea-demo\src\components\menu\five-menu.vue
-->
<template>
  <!--5级导航
  butsData5:5级导航名（数组）
  active5:默认显示页面
  -->
  <div class="five-menu">
    <div
      v-for="(itme, i) in butsData5"
      :key="i"
      :class="{ tabsActive5: active5 === i }"
      @click="state5(i)">
      <a href="javascript:void(0)">{{ itme.name }}</a>
    </div>
  </div>
</template>

<script>
export default {
  name: 'FiveMenu',
  props: {
    butsData5: {
      type: Array,
      default: () => {
        []
      }
    }
  },
  data() {
    return {
      active5: 0
    }
  },

  methods: {
    state5(i) {
      this.active5 = i
      this.$emit('num', i)
    }
  }
}
</script>

<style scoped>
.five-menu {
  height: 42px;
  border: 1px solid #cdd5e1;
  border-radius: 20px;
  line-height: 40px;
  overflow: hidden;
}
.five-menu div {
  height: 30px;
  float: left;
  padding-left: 20px;
  padding-right: 20px;
  margin: 5px 5px;
  text-align: center;
  line-height: 30px;
  border-radius: 15px;
}
.five-menu div a {
  text-decoration: none;
  display: block;
  font-size: 16px;
  color: #666666;
}
.tabsActive5 {
  background-color: #2f85f0;
  box-shadow: 2.83px 2.83px 7px rgba(47, 133, 240, 0.2);
}
.tabsActive5>:first-child{
    color: #fff;
}
</style>
